#ifndef GUI_BUTTON_H
#define GUI_BUTTON_H

#include <string>

//#include "BaseElement.h"
#include "gdn/GDN.h"

#define GUI_BUTTON_IDLE    0
#define GUI_BUTTON_ENTER   1
#define GUI_BUTTON_HOVER   2
#define GUI_BUTTON_EXIT    3
#define GUI_BUTTON_PRESS   4
#define GUI_BUTTON_HOLD    5
#define GUI_BUTTON_RELEASE 6

namespace gui
{
	class Button //: BaseElement
	{
		public:
			Button();
			Button( const gdn::Vector2f& thePos,
			        const std::string& theTextIdle, const std::string& theTextHover, const std::string& theTextPress,
					const gdn::Color& theColorIdle, const gdn::Color& theColorHover, const gdn::Color& theColorPress,
					gdn::Image& theImageSet, gdn::Font& theFont, unsigned int theCharacterSize,
					const gdn::Rectanglei& theRectIdle, const gdn::Rectanglei& theRectHover, const gdn::Rectanglei& theRectPress );

			virtual int  Process( const gdn::Event& event );
			virtual void Draw( gdn::Window& window );
			virtual void Draw( gdn::RenderImage& renderImage );

		protected:
			gdn::Vector2f pos;
			gdn::Vector2f mousePos;

			std::string textIdle;
			std::string textHover;
			std::string textPress;

			gdn::Color colorIdle;
			gdn::Color colorHover;
			gdn::Color colorPress;

			gdn::Image* imageSet;
			gdn::Font* font;
			unsigned int characterSize;

			gdn::Rectanglei rectIdle;
			gdn::Rectanglei rectHover;
			gdn::Rectanglei rectPress;

			gdn::Sprite buttonSprite;
			gdn::Text buttonText;
			gdn::Rectanglei* activeRect;

			bool hold;
	};
}

#endif // GUI_BUTTON_H
